From 15a40c9975a1223b5730a9cf1c9779f4d0ae554d Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 12 Sep 2005 12:29:40 +0000 Subject: [PATCH] Xen_version hypercalls takes two args, not one. Signed-off-by: Ian Pratt Signed-off-by: Keir Fraser --- extras/mini-os/include/hypervisor.h | 8 ++++---- linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c | 2 +- linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h | 4 ++-- .../include/asm-xen/asm-x86_64/hypercall.h | 4 ++-- xen/arch/x86/x86_32/entry.S | 2 +- xen/arch/x86/x86_64/entry.S | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/extras/mini-os/include/hypervisor.h b/extras/mini-os/include/hypervisor.h index ed3cab6fe6..ee96d30bb0 100644 --- a/extras/mini-os/include/hypervisor.h +++ b/extras/mini-os/include/hypervisor.h @@ -414,15 +414,15 @@ HYPERVISOR_event_channel_op( static inline int HYPERVISOR_xen_version( - int cmd) + int cmd, void *arg) { int ret; - unsigned long ignore; + unsigned long ignore, ign2; __asm__ __volatile__ ( TRAP_INSTR - : "=a" (ret), "=b" (ignore) - : "0" (__HYPERVISOR_xen_version), "1" (cmd) + : "=a" (ret), "=b" (ignore), "=c" (ign2) + : "0" (__HYPERVISOR_xen_version), "1" (cmd), "2" (arg) : "memory" ); return ret; diff --git a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c index 6698c37603..6cb42af88a 100644 --- a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c +++ b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c @@ -123,7 +123,7 @@ extern asmlinkage unsigned int do_IRQ(struct pt_regs *regs); */ void force_evtchn_callback(void) { - (void)HYPERVISOR_xen_version(0); + (void)HYPERVISOR_xen_version(0, NULL); } EXPORT_SYMBOL(force_evtchn_callback); diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h index 948e0b0892..6bdcb310ff 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h @@ -270,9 +270,9 @@ HYPERVISOR_event_channel_op( static inline int HYPERVISOR_xen_version( - int cmd) + int cmd, void *arg) { - return _hypercall1(int, xen_version, cmd); + return _hypercall2(int, xen_version, cmd, arg); } static inline int diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h index 468b7c671a..11e869b730 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h @@ -260,9 +260,9 @@ HYPERVISOR_event_channel_op( static inline int HYPERVISOR_xen_version( - int cmd) + int cmd, void *arg) { - return _hypercall1(int, xen_version, cmd); + return _hypercall2(int, xen_version, cmd, arg); } static inline int diff --git a/xen/arch/x86/x86_32/entry.S b/xen/arch/x86/x86_32/entry.S index bb19f302b8..1fee8f010b 100644 --- a/xen/arch/x86/x86_32/entry.S +++ b/xen/arch/x86/x86_32/entry.S @@ -834,7 +834,7 @@ ENTRY(hypercall_args_table) .byte 4 /* do_update_va_mapping */ .byte 2 /* do_set_timer_op */ /* 15 */ .byte 1 /* do_event_channel_op */ - .byte 1 /* do_xen_version */ + .byte 2 /* do_xen_version */ .byte 3 /* do_console_io */ .byte 1 /* do_physdev_op */ .byte 3 /* do_grant_table_op */ /* 20 */ diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index 6d8fb1bac9..a696b65dfe 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -655,7 +655,7 @@ ENTRY(hypercall_args_table) .byte 3 /* do_update_va_mapping */ .byte 1 /* do_set_timer_op */ /* 15 */ .byte 1 /* do_event_channel_op */ - .byte 1 /* do_xen_version */ + .byte 2 /* do_xen_version */ .byte 3 /* do_console_io */ .byte 1 /* do_physdev_op */ .byte 3 /* do_grant_table_op */ /* 20 */ -- 2.30.2